var {
  ocrUtils,
  clickUtils,
  randomUtils,
  logUtils,
} = require("../../utils/index");
var pointMap = require("./pointMap");

module.exports = {
  inHome() {
    var contents = [
      // prettier-ignore
      "首页",
      "我的",
    ];
    return ocrUtils.captureExistsAllText(contents, true);
  },
  toTask() {
    logUtils.info("前往首页任务");
    clickUtils.clickPointMap(pointMap.首页.我的);
    sleep(randomUtils.getRandom(1.5, 5, 1000));
    clickUtils.clickPointMap(pointMap.我的.去赚钱);
    sleep(randomUtils.getRandom(5, 7, 1000));
  },
};
